<?
namespace app\api\model;
use think\Model;

class Pinlun extends Model
{
	protected $name = 'dongtaipinglun';
    //当取出来时ctime就是按照这个格式转换的
    protected $type = [ 'create_time' => 'timestamp:Y-m-d H:i', ];
    // 开启自动写入时间戳 
    protected $autoWriteTimestamp = true;
    
     public function dongtai() 
    { 
    	return $this->belongsTo('Dongtai');
    }
     public function user() 
    { 
    	return $this->belongsTo('User');
    }
}